package cc.rengu.redp.bizimpl.upmp.service.impl;/*
package cc.rengu.redp.bizimpl.upmp.service.impl;

import cc.rengu.redp.bizimpl.upmp.common.BusinessContainer;
import cc.rengu.redp.bizimpl.upmp.dao.TermModelInfoMapper;
import cc.rengu.redp.bizimpl.upmp.domain.TermModelInfo;
import cc.rengu.redp.bizimpl.upmp.service.ITermModelInfoService;
import cc.rengu.redp.bizimpl.upmp.vo.UpmpUserInfoVO;
import cc.rengu.redp.bizimpl.utils.Common;
import cc.rengu.redp.bizimpl.utils.CommonUtils;
import cc.rengu.redp.bizimpl.utils.GZIPUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

*/
/**
 * @author 刘玉亮.LL
 *//*

@Service
public class TermModelInfoServiceImpl extends ServiceImpl<TermModelInfoMapper, TermModelInfo> implements ITermModelInfoService {

    public Map<String, Object> termmodelSelect2List(HttpServletRequest request) {
         UpmpUserInfoVO user = CommonUtils.getCurrentUser(upmpSysParamService);
        String q = request.getParameter("q");
        if (null == q) {
            return null;
        }
        q=q.replaceAll("&amp;", "&");
        String[] param = q.split("&");

        if (null != param && param.length > 0) {
            request.setAttribute("search['CN_modelCode_OR_modelName']", param[0]);
        }
        if (null != param && param.length > 1) {
            request.setAttribute("search['EQ_brandCode']", param[1]);
        }
        request.setAttribute("search['EQ_status']", BusinessContainer.data_sta_01);
        if(user.isAdmin()) {
            request.setAttribute("search['EQ_instId']", param[2]);
        }else{
            request.setAttribute("search['IN_crtOrgId']", GZIPUtils.uncompressToString(user.getUserOrgCodes()));
        }
        int pageIndex = Common.isBlank(request.getParameter("page")) ? 1 : Integer.parseInt(request.getParameter("page"));
        GroupPropertyFilter groupPropertyFilter = GroupPropertyFilter.buildFromHttpRequest(TermModelInfo.class, request);
        Pageable pageable = (Pageable) PropertyFilter.buildPageableFromHttpRequest(request);
        */
/*
         * 构建pageable时需要放入request里面的参数。
         * "rows"-每页多少行；
         * "page"-当前页；
         * "start"-起始行（可以不提供，默认为：page * rows）
         *//*

        Page<TermModelInfo> page = this.findByPage(groupPropertyFilter, pageable);
        List<TermModelInfo> listx = page.getContent();
        Map<String, Object> maps = new HashMap<String, Object>();
        Map<String, String> map = new HashMap<String, String>();
        List<Object> list = new ArrayList<Object>();
        if (listx != null) {
            for (int i = 0; i < listx.size(); i++) {
                TermModelInfo tm = listx.get(i);
                map = new HashMap<String, String>();
                map.put("id", tm.getModelCode());
                map.put("name", tm.getModelName());
                list.add(map);
            }
            maps.put("results", list);
            if(pageIndex == page.getTotalPages()){
                maps.put("more", false);
            }else{
                maps.put("more", true);
            }
        }
        return maps;
    }

    public List<String> findAllmodelCd() {
        return termModelDao.findAllmodelCd();
    }

    public List<String> findAllmodelCdName(String modelCd, String modelName) {
        return termModelDao.findAllmodelCdName(modelCd, modelName);
    }

    public TermModelInfo findByModelCd(String modelCd) {
        return termModelDao.findByModelCd(modelCd);
    }

}
*/
